﻿package mortal.game.view.ActionIconPublic.wechatReward
{
    import flash.events.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class WechatRewardIcon extends ActionBaseIcon
    {
        private static var _instance:WechatRewardIcon;

        public function WechatRewardIcon()
        {
            super(ResFileConst.WeChatIcon);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            if (WechatRewardModule.isViewShow)
            {
                WechatRewardModule.instance.hide();
            }
            else
            {
                WechatRewardModule.instance.show();
            }
            return;
        }// end function

        public static function get instance() : WechatRewardIcon
        {
            if (_instance == null)
            {
                _instance = new WechatRewardIcon;
            }
            return _instance;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

    }
}
